package com.hdoit.apollo.web.purchase.modelconfig;

import com.hdoit.apollo.web.shop.providers.StaffProvider;
import com.hdoit.apollo.web.shop.providers.SupplierProvider;
import com.tennetcn.web.component.attribute.DisplayNameAttribute;
import com.tennetcn.web.component.attribute.DropDownListAttribute;
import com.tennetcn.web.component.attribute.base.ModelMetadataAttributeConfiguration;

public class PurchaseSearchConfig extends ModelMetadataAttributeConfiguration{
	public PurchaseSearchConfig(){
        this.setProperty("purchaseNo")
            .hasAttribute(new DisplayNameAttribute("采购单号"));

        this.setProperty("supplierId")
            .hasAttribute(new DisplayNameAttribute("供应商"))
        	.hasAttribute(new DropDownListAttribute(new SupplierProvider()));
        
        this.setProperty("purchaseName")
	        .hasAttribute(new DisplayNameAttribute("采购员"))
	    	.hasAttribute(new DropDownListAttribute(new StaffProvider()));
        
        this.setProperty("startDate")
        	.hasAttribute(new DisplayNameAttribute("开始时间"));

	    this.setProperty("endDate")
	        .hasAttribute(new DisplayNameAttribute("至"));
    }
}
